1. Field of the Invention
Embodiments of the present invention generally relate to digital camera processing and, more specifically, to DCT-based flicker detection.
2. Description of the Related Art
Various handheld devices are widely available that provide the capability to capture photographs. These handheld devices include portable digital cameras as well as mobile devices with built-in cameras, such as smartphones and pad computers. These cameras typically employ a complementary metal-oxide-semiconductor (CMOS) sensors to capture light and convert the light into a digital signal that represents an image frame. Some cameras with CMOS sensors include a global shutter, where the entire CMOS sensor, corresponding to the entire image frame, is exposed at the same time. More typically, cameras with CMOS sensors include a rolling shutter, where a subset of rows of the CMOS sensor is exposed at any given time. An entire image frame is captured by dividing the image frame into multiple row subsets, and exposing each row subset for a specified duration. The row subsets are then blended together to compose the full image frame. This type of rolling shutter technique may improve sensitivity of the CMOS sensor, particularly under low-light conditions.
One drawback of the above rolling shutter technique is that, because the different row subsets are exposed at different moments in time, cameras with rolling shutters suffer from various spatial and temporal artifacts such as camera movement, subject movement, skew, smear, and wobble. One such artifact results from capturing an image frame under lighting conditions where the light intensity fluctuates over time, such as fluorescent lighting. When capturing an image frame under a fluctuating light source, one row subset may accumulate a relatively high amount of light from the light source, while another row subset may accumulate a relatively low amount of light from the light source. Consequently, a series of light and dark bands may appear in the final image, even though each row subset is exposed for the same duration. Such an artifact may be referred to as flicker.
One possible solution to the above issue is to match the pattern of the light and dark bands at known frequencies used by fluctuating light sources, such as 50 Hz and 60 Hz. A flicker detecting unit in the camera determines if light and dark bands are present in the image. If light and dark bands exist in the image, the flicker detection unit attempts to match the bands to either 50 Hz or a 60 Hz. A flicker correction unit then removes the bands based on a detected frequency of either 50 Hz or 60 Hz. One drawback of this possible solution is that not all fluctuating light sources alternate at a 50 Hz or 60 Hz frequency, and are not detectable by the flicker detection unit. In addition, traditional flicker detection approaches yield an unacceptably high quantity of false detections and missed detections. As a result, some light and dark band artifacts are not corrected, while images that do not indicate light and dark bands are improperly corrected, leading to poor image quality.
As the foregoing illustrates, what is needed in the art is a more effective way to capture images with rolling shutter cameras under fluctuating lighting conditions.